package org.elec.mac.service;

import org.elec.mac.entity.SSaleTotal;
import org.elec.mac.mapper.SSaleTotalMapper;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.sql.SQLException;

/**
 * @Description: 逻辑层接口
 * @author 
 * @version 1.0
 * @created 
 */
@Service
public class SSaleTotalService extends BaseService<SSaleTotal, SSaleTotalMapper> implements InitializingBean {

    @Autowired
    private SSaleTotalMapper sSaleTotalMapper;

    public void afterPropertiesSet() throws Exception {
        this.setBaseMapper(sSaleTotalMapper);
    }



    /**
     * @param sSaleTotal
     * @throws SQLException
     */
    @Transactional(rollbackFor = SQLException.class)
    public void insertSaleProductTotal(SSaleTotal sSaleTotal) throws SQLException {
        sSaleTotalMapper.insert(sSaleTotal);
    }

    /**
     *
     * @param sSaleTotal
     * @throws SQLException
     */
    @Transactional(rollbackFor = SQLException.class)
    public void updateVipOrder(SSaleTotal sSaleTotal) throws SQLException {
        sSaleTotalMapper.update(sSaleTotal);
    }
}